<template>
  <div id="app">
    <!-- v-if 局部刷新使用 -->
    <router-view v-if="localNeed" :key="$store.state.isnum" />
  </div>
</template>

<script>
export default {
  name: 'App',
  provide () {
    return {
      reload: this.reload
    }
  },
  data () {
    return {
      localNeed: true
    }
  },
  methods: {
    reload () {
      this.localNeed = false
      this.$nextTick(() => {
        this.localNeed = true
      })
    }
  }
  //   computed: {
  //     currentNode () {
  //       return this.$store.getters.currentNode
  //     }
  //   },
  //   mounted () { // 在页面刷新时将vuex里的信息保存到sessionStorage里 // window.addEventListener('beforeunload', () => { //   sessionStorage.setItem('deptID', JSON.stringify(this.currentNode)) // }) // 在页面加载时读取sessionStorage里的状态信息 // if (sessionStorage.getItem('dept')) { //   this.$nextTick(() => { //     this.$store.dispatch( //       'tree/UPDATE_NODE', //       sessionStorage.getItem('deptID') //     ) //   }) // }
  //   } // watch: { //   '$route.path' (newVal) { //     if (newVal !== '/login') { //       // this.queryParams.deptId = newVal //       console.log(this.$store.state.deptId, newVal) //     } //   } // }
}
</script>
<style lang="scss">
html,
body,
#app {
  height: 100%;
}
.container {
  padding: 10px;
}
// select选择器的宽度
.select_width {
  width: 200px;
}
.el-dialog__header {
  background: linear-gradient(270deg, #01c6fa, #1493fa);
  padding: 15px;
  text-align: center;
}
.el-dialog__header .el-dialog__title {
  color: #fff;
}
.el-dialog__close {
  color: #fff !important;
}
.el-dialog__headerbtn {
  width: 30px;
  top: 15px;
  right: 10px;
  border: 1px solid #ccc;
  background-color: #aa3c30;
}
.el-dialog__footer {
  text-align: center;
}
// 去掉百度地图Logo
.BMap_cpyCtrl {
  display: none;
}
.anchorBL {
  display: none;
}
.el-scrollbar .el-scrollbar__wrap {
  overflow-x: hidden;
}
.el-select-dropdown__item.hover, .el-select-dropdown__item:hover {
    background-color: #ebeef5;
}
.el-select-dropdown__list {
  padding: 2px 0 15px;
  .el-select-dropdown__item {
    padding-left: 5px;
  }
}
.el-tree > .el-tree-node {
  min-width: 100%;
  display: inline-block;
}
* {
  list-style: none;
}

// iconfont 图标样式
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
// .el-icon-caret-right:before{
// 	color: #4f5555;
// }
// .el-tree-node.is-current > .el-tree-node__content {
//    background-color:#bdd3fa !important;

// }
</style>
